# ---------------------------------------------------------------------------
# Author: Misc, most inspired by ~Clint, Alex Angelopoulos and Andrew Watt
# Desc:   Logs each PowerShell session via the Start-Transcipt functionality
#         to a unique filename in the Transcripts subdir of your 
#         WindowsPowerShell user directory.
# Site:   http://www.codeplex.com/PowerShellCX
# Usage:  In your profile place the following command:
#  
#         . "$Env:PscxHome\Profile\TranscribeSession.ps1"
# ---------------------------------------------------------------------------
$PscxTranscriptDir = Join-Path (Split-Path $Profile -Parent) Transcripts
if (!(test-path $PscxTranscriptDir)) {
	New-Item $PscxTranscriptDir -ItemType Directory | Out-Null
}

$PscxTranscriptFile = Get-Date -Format yyyyMMdd.HHmmss.$PID.\tx\t
$private:TranscriptPath = Join-Path $PscxTranscriptDir $PscxTranscriptFile
Start-Transcript $private:TranscriptPath